home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / mail / delivery / sendmail.002 / sendmail / sendmail-8.7.3-bin / Internet-Mail < prev    next >
Encoding:
Text File  |  1995-12-10  |  8.5 KB  |  218 lines

  1. # Copyright (c) 1994,1995 Jason L. Haar
  2. # Copyright (c) 1994,1995 Lazerjem Ltd.
  3. # All rights reserved.
  4. #
  5. # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  6. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  7. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  8. # ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  9. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  10. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  11. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  12. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  13. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  14. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  15. # SUCH DAMAGE.
  16. #
  17. #    @(#)Internet-Mail    1.0 (Lazerjem)    2/Apr/954
  18. #                        9/Nov/95
  19.  
  20.  
  21.             Internet Mail
  22.             -------------
  23.  
  24. One of the the most popular of all computer applications is Electronic
  25. Mail (Email). These days it forms an integral part of many peoples'
  26. working lives and is as important to them and their work as the
  27. telephone.
  28.  
  29. The biggest infrastructure for Email is provided by the Internet,
  30. which as well as permitting Email communication between Internet
  31. sites, allows gatewaying to other networks.  All sites that are
  32. directly on the Internet communicate with each other via a common
  33. language called the "Simple Mail Transport Protocol" (SMTP).  This
  34. itself runs on top of the "Internet Protocol" (IP).  SMTP is another
  35. TCP/IP service like the more familiar FTP and Telnet.  
  36.  
  37. When you create an Email message, you use a Mail User Agent (MUA).
  38. These are the programs you - the User - use to create and read Email
  39. messages.  Examples of popular MUAs are Elm, Pine and the X-windows
  40. mailer, Messages.  Under Un*x, there are a _huge_ variety of MUAs.
  41. It sometimes looks like anyone who knows how to program in C has
  42. written a MUA at some stage.  I recommend that you adopt a popular MUA
  43. simply because if something goes wrong, there is always extensive help
  44. available from the Internet. 
  45.  
  46. The message you create with your MUA comprises two distinct parts, the
  47. body of the message and the address.  The address is normally in a
  48. form that says something meaningful about the location of the user,
  49. e.g. j.haar@lazerjem.demon.co.uk.  The message is passed to the
  50. system's Mail Transfer Agent (MTA). This program is responsible for
  51. the transport of the Email message to its destination. Examples of
  52. popular MTAs on the Linux platform are smail and sendmail. Your MTA
  53. decides where the message is to go and sends it there, possibly
  54. connecting to another MTA on a remote host in the process.  The
  55. message is appended to a file which can then be accessed by the
  56. recipient's MUA.  Under Linux, the message would be appended to the
  57. file /usr/spool/mail/<usercode>. For example, my usercode is jason, so
  58. mail for me appears in the file /usr/spool/mail/jason.
  59.  
  60. So, how *does* the MTA know what to do with your message? Given that a
  61. computer identifies an Internet site by a *number* - its IP address
  62. e.g.  158.152.26.235 - how does a MTA in New Zealand know what it
  63. means when when you send an Email message to
  64. "j.haar@lazerjem.demon.co.uk"?  SMTP would be very limited if it
  65. wasn't for the existence of something that allows systems to work out
  66. what IP address corresponds to what name. This role can be provided by
  67. a host table (see /etc/hosts) but this is normally restricted to LAN
  68. hosts only. For a network as large as the Internet, a host table is
  69. impractical and a distributed database is available instead.  This is
  70. the Domain Name Service (DNS).
  71.  
  72. The DNS is a clever beast. Besides containing records mapping
  73. hostnames to IP addresses, it contains other information too including
  74. the MX records.  These are used by MTAs in the decision process of
  75. what to do with an Email address. MX records allows a site to tell the
  76. rest of the Internet how Email to that site should be handled. The
  77. site may decide that all incoming Email should be sent to a central
  78. mailhost instead of to the individual hosts (or not). The site may
  79. also decide to create secondary MX records which tell MTAs where to
  80. send messages if the primary mail site is down (it is good practice
  81. for sites to have at least two MX records). Although the DNS is a
  82. distributed database, each site is in charge of its own information.
  83. If a new host is added to the DNS at one site, within about a day
  84. every site on the Internet will automatically know about it.
  85.  
  86. To demonstrate all this, let's use a real-life example. Suppose I 
  87. want to send an Email message to Kaylene Murdoch at Oxford University.
  88.  
  89. 1)     I create the Email message to k.murdoch1@ph.ox.ac.uk using my
  90.         favourite MUA, Messages.
  91.  
  92. 2)    The MUA passes off the message to my Linux system's MTA, 
  93.     sendmail-8.7.3.
  94.  
  95. 3)    The MTA asks the DNS for information about ph.ox.ac.uk, and
  96.     is told that any Email messages to that address should actually be
  97.     send to mail.physics.ox.ac.uk. The DNS is then asked what the 
  98.     IP address is for the string "mail.physics.ox.ac.uk" and returns 
  99.     the value 111.222.111.222. 
  100.  
  101. 4)    My Linux system then starts an SMTP connection to 111.222.111.222, 
  102.     transmits the message, and then closes down the connection.
  103.  
  104. 5)    mail.physics.ox.ac.uk then goes through a similar series of actions 
  105.     to make the final delivery to to the machine oxds02.astro.ox.ac.uk, 
  106.         whereupon Kaylene reads my message with her favorite MUA, Pine.
  107.  
  108. Anyone with access to the Internet should be using the DNS. If you
  109. access the Internet via dial-up rather than Ethernet, IP connectivity
  110. is possible via SLIP/PPP.  With  PPP/SLIP access you have two options.
  111.  
  112. 1)    Configure your MTA to use the DNS, so that every message you send 
  113.     goes to its destination via MX record lookups
  114.  
  115. 2)    Configure your MTA to simply forward all non-local mail you send to 
  116.     an Ethernet-connected Internet MTA. In this case that MTA will do
  117.         all the MX lookups and the final delivery. This will result in
  118.     shorter phone-calls, as
  119.     all the waiting for connections to hosts on the other side of the 
  120.     world will be done by the fully Internet-connected mail server. You 
  121.     had better check first with your Internet provider to see if they 
  122.     mind. 
  123.  
  124. Needless to say, no matter which option you choose, you should still 
  125. configure your Linux box to use the DNS. Don't forget, you still want the 
  126. DNS for non-Email events like telnet and ftp.
  127.  
  128. Configuring Linux to use the DNS is very easy. It involves editing two files:
  129.  
  130. 1)    edit /etc/resolv.conf
  131.  
  132. #-------- BEGIN FILE ---------
  133. #/etc/resolv.conf
  134.  
  135. #Define what domain your host is a member of. As an example, my Linux box 
  136. #hangs off the "demon.co.uk" network (my fully-qualified domain name is
  137. # "lazerjem.demon.co.uk"). PLEASE EDIT THIS!!!!
  138.  
  139. domain demon.co.uk
  140.  
  141. #Now tell your system where it can send DNS queries to. You can have up to
  142. # three (?) Domain Name Servers as a list here. If the first one isn't 
  143. # available, the second one will be asked, etc.
  144. # Chose name servers that are close by to ensure speedy response
  145.  
  146. nameserver 158.152.1.65
  147.  
  148. #-------- END FILE ----------
  149.  
  150.  
  151. 2) edit /etc/host.conf
  152.  
  153. #------- BEGIN FILE ---------
  154.  
  155. # The "order" keyword tells Linux the order in which it should search in 
  156. # host name lookups. The general case is to search /etc/hosts first, and 
  157. # if the host isn't in there, as DNS (called bind for this file)
  158.  
  159. order hosts bind
  160.  
  161. #-------- END FILE ----------
  162.  
  163.  
  164. That's it! Now any IP application should be able to use the DNS.
  165.  
  166. Now that this introduction to Internet Mail is over, let's move onto the 
  167. messy stuff - actually configuring the sendmail-V8 MTA.
  168.  
  169.  
  170.  
  171.  
  172. APPENDIX: FURTHER REFERENCES
  173. ----------------------------
  174.  
  175. The primary references for TCP/IP services such as SMTP are the
  176. "Requests For Comments" (RFCs).  These documents are available via
  177. anonymous FTP from a variety of sites (use Archie), and cover ALL
  178. Internet protocols. There are RFCs on Telnet, FTP, Usenet News, as
  179. well as SMTP.
  180.  
  181.  
  182. RFC 822         D. Crocker, "Standard for the format of ARPA Internet text 
  183.         messages" 08/13/1982
  184.  
  185. RFC 1425    J. Klensin, N. Freed, M. Rose, E. Stefferud, D. Crocker, "SMTP
  186.                Service Extensions", 02/10/1993. (Pages=10) (Format=.txt)
  187.  
  188. RFC 1522    K. Moore, "MIME (Multipurpose Internet Mail Extensions) Part 
  189.         Two: Message Header Extensions for Non-ASCII Text", 09/23/1993.    
  190.  
  191. RFC 1521    N. Borenstein, N. Freed, "MIME  (Multipurpose Internet Mail
  192.                Extensions) Part One:  Mechanisms for Specifying and 
  193.         Describing the Format of Internet Message Bodies", 09/23/1993.
  194.  
  195.  
  196.  
  197. RFC 819           Z. Su, J. Postel, "Domain naming convention for Internet 
  198.         user  applications", 08/01/1982
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.